<extend name="Common/back" />

<block name="content">
    <div id="content">
        <div class="page-header">
            <div class="container-fluid">
                <div class="pull-right">
                    <button type="submit" form="form-set" data-toggle="tooltip" title="保存" class="btn btn-primary">
                        <i class="fa fa-save"></i>
                    </button>
                    <a href="{:U('list')}" data-toggle="tooltip" title="取消" class="btn btn-default">
                        <i class="fa fa-reply"></i>
                    </a>
                </div>
                <h1>长度单位</h1>
                <ul class="breadcrumb">
                    <li>
                        <a href="{:U('Manage/index')}">首页</a>
                    </li>
                    <li>
                        <a href="javascript:;">长度单位</a>
                    </li>
                </ul>
            </div>
        </div>
        <div class="container-fluid">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title">
                        <i class="fa fa-pencil"></i>
                        设置长度单位
                    </h3>
                </div>
                <div class="panel-body">
                    <form action="{:U('set')}" method="post" enctype="multipart/form-data" id="form-set"
                    class="form-horizontal">
                        <if condition="isset($data['length_unit_id'])">
                            <input type="hidden" name="length_unit_id" value="{$data['length_unit_id']}" id="input-length_unit_id">
                        </if>
                        <ul class="nav nav-tabs">
                            <li class="active">
                                <a href="#tab-general" data-toggle="tab">基本信息</a>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <div class="tab-pane active" id="tab-general">

                                <div class="form-group">
                <label class="col-sm-2 control-label" for="input-title"></label>
                  <div class="col-sm-10">
                 <input type="text" class="form-control" placeholder=""
                 name="title" id="input-title" value="{$data['title']}"/>
                 <if condition="isset($message['title'])">
                 <label for="input-title" class="text-danger">{$message['title']}</label>
              </if>
             </div>
            </div><div class="form-group">
                <label class="col-sm-2 control-label" for="input-sort_number">排序</label>
                  <div class="col-sm-10">
                 <input type="text" class="form-control" placeholder="排序"
                 name="sort_number" id="input-sort_number" value="{$data['sort_number']}"/>
                 <if condition="isset($message['sort_number'])">
                 <label for="input-sort_number" class="text-danger">{$message['sort_number']}</label>
              </if>
             </div>
            </div>

                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>

<block name="appendJs">
    <script src="__PUBLIC__/Back/validate/jquery.validate.min.js"></script>
    <script src="__PUBLIC__/Back/validate/additional-methods.min.js"></script>
    <script src="__PUBLIC__/Back/validate/localization/messages_zh.min.js"></script>

    <script>
    // 表单的JS验证
        $(function(){
            $('#form-set').validate({});
        });
    </script>

</block>